<? 
include("../config.php");
include("aup.php");
if($sort == "") {$sort = "name";}
?>
<html>
<head>
<title>PA - Editar personajes </title>
<link href="../styles/phaos.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="600" border="1" cellspacing="0" cellpadding="3" align="center">
  <tr style=background:#006600;> 
    <td colspan="2"> 
      <div align="center"><b>Editar personajes </b></div>
    </td>
  </tr>
  <tr>
  	<td colspan=2 align=center>
  			<form><input type='button' onClick="parent.location='index.php'" value='Volver al panel de Administrador'></form>
  	</td>
  </tr>
  <tr> 
<td><font color="#FFFFFF"><table><tr><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=id'>ID</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=name'>Nombre:</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=race'>Race</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=hit_points'>HP</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=level'>Nivel</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=armor'>Armadura</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=xp'>Exp</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=gold'>Oro</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=image_path'>Ruta de la imagen</a></td><td><a href='<? print $_SERVER[PHP_SELF] ?>?sort=location'>Localizacion</a></td></tr>
	<?
	$self=mysql_query("SELECT * FROM phaos_characters ORDER BY $sort ASC");
	while ($row = mysql_fetch_array($self)) {
		echo "<tr><td>".$row['id']."</td><td><a href='change_wrldchr.php?wrldchr={$row['id']}'>".$row['name']."</a></td><td>".$row['race']."</td><td>".$row['hit_points']."</td><td>".$row['level']."</td><td>".$row['armor']."</td><td>".$row['xp']."</td><td>".$row['gold']."</td><td>".$row['image_path']."</td><td>".$row['location']."</td></tr>";
	}
	?>
	</font></td>
  </tr>
</table>
</body>
</html>
